Geometric Computation: Foundations for Design by Joy Ko Kyle Steinfeld

Geometric Computation: Foundations for Design by Joy Ko Kyle Steinfeld

Author:Joy Ko,Kyle Steinfeld
Language: eng
Format: epub
ISBN: 9781317659075
Publisher: Taylor & Francis (CAM)


Comparing Lines, Rays, and Segments

In considering the comparison of the three subclasses of LinearEntities, we find that the particular representation of objects in code, as a Point and Vec in Decod.es, influences the construction of the relevant methods in ways that feel at odds with the mathematical or visual outlook. This complication includes, but goes beyond, the distinction between equality and identity of objects that was drawn in our discussion of Boolean operators in Chapter 1.02. For example, it may make sense in code to consider two Segments as equal only if they share precisely the same seg.spt and seg.ept, while from a visual standpoint we might simply consider the commonality of termination Points irrespective of the direction of the Segment. Contrast the seg.is_coincident() and seg.is_equal() methods in the nearby table. Similarly, consider that in mathematics, infinite lines manifest no particular reference point. This is at odds with our representation in code, and foregrounds the question of how to characterize the relation between two Lines that are parallel yet are defined by distinct collinear Points. Absent any standard conventions that would provide guidance here, the Decod.es library stakes its own position: while the equality of two Lines line.is_equal() is sensitive to the location of reference Points and the magnitude of the underlying vectors, their coincidence line.is_coincident0 is not. As we consider the myriad of ways that the subclasses of Line, Ray, and Segment may be compared, a host of similar issues arise, each a result of the tension between the mathematical, computational, and visual representations of these elements. As there is no set of universal conventions that adequately address these questions, we leave it to the reader to review the following tables that details the position taken by the Decod.es library.

table 1.35

LINE COMPARISON METHODS

Equality

la == lb

la.is_equal(lb,tol_p,tol_a) True if the two Lines share a common reference Point and their vectors are coincident.

Coincidence

la.is_coincident(lb,tol_p,tol_a) True if the two Lines share any Point along their length and their vectors are coincident. Collinearity is a similar test requiring only parallel vectors.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.